import React, { Fragment, PureComponent } from 'react'

export class App extends PureComponent {
  constructor() {
    super()
    this.state = {
      users: [
        { id: 1, name: '张三', age: 22 },
        { id: 2, name: '李四', age: 24 },
        { id: 3, name: '王五', age: 23 },
      ]
    }
  }
  render() {
    const { users } = this.state
    return (
      <>
        <h1>标题</h1>
        <p>内容xxx</p>
        {
          users.map(item => {
            return (
              <Fragment key={item.id}>
                <p>{ item.name } - { item.age }</p>
              </Fragment>
            )
          })
        }
      </>
    )
  }
}

export default App